package com.baida.retail.tasksystem.mapper.ext;

import com.baida.retail.tasksystem.entity.Task;
import com.baida.retail.tasksystem.mapper.TaskMapper;

import java.util.List;

public interface TaskMapperExt extends TaskMapper {
    int updateTaskStatusToFinishedOnOrder(long orderId);

    Integer selectMostUrgentTaskIdOwnedBy(int ownerId, int taskType);

    List<Task> selectTasksByRepoIdAndStatus(int repoId, int status, int taskType);

    List<Task> selectTasksByOrderId(long orderId);

    Task selectTask(Long orderId, int taskType);

    int getUnfinishedTaskCount(int ownerId, int taskType);

    List<Task> selectUnfinishedTasks(int ownerId, int taskType, int index, int size);

    List<Task> selectFinishedTasks(int ownerId, int taskType, int index, int size);
}
